package org.dey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.dey.pojo.RiskAssessment;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RiskAssessmentMapper extends BaseMapper<RiskAssessment> {

    @Delete("delete FROM t_risk_assessment where raidd = #{id}")
    void deleteByRaid(Integer id);

    @Select("SELECT tm.`file_number`,tm.`name` ra_name,ra.* FROM `t_risk_assessment` ra INNER JOIN `t_member` tm ON ra.`raid`=tm.`file_number`")
    List<RiskAssessment> queryRa();


}
